﻿
<div>
    <form name="disputeInformationCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.disputeInformation.id">编辑信息:{{vm.disputeInformation.name}}</span>
                <span ng-if="!vm.disputeInformation.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.sourceID" required>
                    <option ng-repeat="x in vm.disSourceList" value="{{x.value}}" ng-selected="vm.disputeInformation.sourceID==x.value">{{x.displayText}}</option>
                </select>
                <label>@L("SourceID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.disputeTypeID" required>
                    <option ng-repeat="x in vm.disputeTypeList" value="{{x.id}}" ng-selected="vm.disputeInformation.disputeTypeID==x.id">{{x.title}}</option>
                </select>
                <label>@L("DisputeTypeID")</label>
            </div>


            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.urgencyID" required>
                    <option ng-repeat="x in vm.disUrgencyList" value="{{x.value}}" ng-selected="vm.disputeInformation.urgencyID==x.value">{{x.displayText}}</option>
                </select>
                <label>@L("UrgencyID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <select chosen search_contains="true" name="UserID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.userID" ng-change="vm.userIDChange(vm.disputeInformation.userID)" required>
                    <option ng-repeat="x in vm.userList" value="{{x.id}}" ng-selected="vm.disputeInformation.userID==x.id">{{x.name}}</option>
                </select>
                <label>@L("UploadName")</label>
                <span class="help-block">     @L("UploadName")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2" ng-show="false">
                <input type="text" class="form-control" name="UploadName" ng-class="{'edited':vm.disputeInformation.uploadName}" ng-model="vm.disputeInformation.uploadName" maxlength="50" required />
                <label>@L("UploadName")</label>
                <span class="help-block">     @L("UploadName")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Party" ng-class="{'edited':vm.disputeInformation.party}" ng-model="vm.disputeInformation.party" maxlength="50" required />
                <label>@L("Party")</label>
                <span class="help-block">     @L("Party")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="XPoint" ng-class="{'edited':vm.disputeInformation.xPoint}" ng-model="vm.disputeInformation.xPoint" maxlength="100" />
                <label>@L("XPoint")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="YPoint" ng-class="{'edited':vm.disputeInformation.yPoint}" ng-model="vm.disputeInformation.yPoint" maxlength="100" />
                <label>@L("YPoint")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Phone" ng-class="{'edited':vm.disputeInformation.phone}" ng-model="vm.disputeInformation.phone" maxlength="11" required ng-pattern="/(^$)|^(((\+86)|(86))?1[34578]\d{9})$/" />
                <label>申请人手机号</label>
                <span class="help-block" ng-show="disputeInformationCreateOrEditForm.Phone.$error.required">     @L("Phone")@L("MustBe_Required")</span>
                <span class="help-block" ng-show="!disputeInformationCreateOrEditForm.Phone.$error.required&&disputeInformationCreateOrEditForm.Phone.$invalid">     @L("PleaseEnterTheCorrectType")@L("Phone")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="number" class="form-control" name="InvolveNum" ng-class="{'edited':vm.disputeInformation.involveNum}" ng-model="vm.disputeInformation.involveNum" />
                <label>@L("InvolveNum")</label>
                <span class="help-block">     @L("InvolveNum")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="EventAddress" ng-class="{'edited':vm.disputeInformation.eventAddress}" ng-model="vm.disputeInformation.eventAddress" maxlength="500" />
                <label>@L("EventAddress")</label>
                <span class="help-block">     @L("EventAddress")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.townID" ng-change="vm.bindArea(vm.disputeInformation.townID)" required>
                    <option ng-repeat="x in vm.townList" value="{{x.id}}" ng-selected="vm.disputeInformation.townID==x.id">{{x.title}}</option>
                </select>
                <label>@L("TownID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="AreaID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.areaID" ng-change="vm.bindVillage(vm.disputeInformation.areaID)" required>
                    <option ng-repeat="x in vm.areaList" value="{{x.id}}" ng-selected="vm.disputeInformation.areaID==x.id">{{x.title}}</option>
                </select>

                <label>@L("AreaID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="VillageID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.disputeInformation.villageID" required>
                    <option ng-repeat="x in vm.villageList" value="{{x.id}}" ng-selected="vm.disputeInformation.villageID==x.id">{{x.title}}</option>
                </select>
                <label>@L("VillageID")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <label>事件描述</label>
                <div class="ueditor" ng-model="vm.disputeInformation.eventDesc" style="width: 100%;"></div>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" style="display:none;">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.disputeInformation.evidence}" rows="4" ng-model="vm.disputeInformation.evidence"></textarea>
                <label>调查取证</label>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" style="display:none;">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.disputeInformation.agreement}" rows="4" ng-model="vm.disputeInformation.agreement"></textarea>
                <label>协议书</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" style="display:none;">
                <input type="text" class="form-control" name="ImgUrl" ng-class="{'edited':vm.disputeInformation.imgUrl}" ng-model="vm.disputeInformation.imgUrl" maxlength="500" />
                <label>图片封面</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" style="display:none;">
                <input type="text" class="form-control" name="SuggestionDesc" ng-class="{'edited':vm.disputeInformation.suggestionDesc}" ng-model="vm.disputeInformation.suggestionDesc" maxlength="500" />
                <label>意见</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" style="display:none;">
                <input type="text" class="form-control" name="Status" ng-class="{'edited':vm.disputeInformation.status}" ng-model="vm.disputeInformation.status" />
                <label>状态</label>
            </div>


        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="disputeInformationCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>